package com.itheima.demo.demo9;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

//zhangsan = 90
//lisi = 80
//wangwu = 85
public class Test_05 {
    public static void main(String[] args) throws IOException {
        Properties pop=new Properties();
        pop.setProperty("lisi","80");
        pop.setProperty("zhangsan","90");
        pop.setProperty("wangwu","85");
        pop.load(new FileReader("D:\\FF.txt"));
        Set<Map.Entry<Object, Object>> entries = pop.entrySet();
        for (Map.Entry<Object, Object> key : entries) {
            if(key.getKey().equals("lisi")){
                key.setValue("100");
            }
            Object key1 = key.getKey();
            Object value = key.getValue();

            System.out.println(key1+" "+value);
        }



    }
}
